package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by HangLiu on 2017/8/12.
 */
@Entity
@Table(name = "t_rpt_config_info", schema = "iris_dch_dev", catalog = "")
public class TRptConfigInfoModel {
    private Integer id;
    private String fatherCode;
    private String code;
    private String reportCode;
    private String showName;
    private String typeName;
    private String dbColum;
    private String formular;
    private String remark;
    private String createBy;
    private Timestamp createTime;
    private String updateBy;
    private Timestamp updateTime;
    private Integer isDeleted;

    @Id
    @Column(name = "id", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "father_code", nullable = false, length = 100)
    public String getFatherCode() {
        return fatherCode;
    }

    public void setFatherCode(String fatherCode) {
        this.fatherCode = fatherCode;
    }

    @Basic
    @Column(name = "code", nullable = false, length = 100)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "report_code", nullable = true, length = 100)
    public String getReportCode() {
        return reportCode;
    }

    public void setReportCode(String reportCode) {
        this.reportCode = reportCode;
    }

    @Basic
    @Column(name = "show_name", nullable = true, length = 300)
    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    @Basic
    @Column(name = "type_name", nullable = true, length = 300)
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Basic
    @Column(name = "db_colum", nullable = true, length = 300)
    public String getDbColum() {
        return dbColum;
    }

    public void setDbColum(String dbColum) {
        this.dbColum = dbColum;
    }

    @Basic
    @Column(name = "formular", nullable = true, length = 300)
    public String getFormular() {
        return formular;
    }

    public void setFormular(String formular) {
        this.formular = formular;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = -1)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "create_by", nullable = false, length = 300)
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "create_time", nullable = false)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_by", nullable = false, length = 300)
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Basic
    @Column(name = "update_time", nullable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "is_deleted", nullable = false)
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TRptConfigInfoModel that = (TRptConfigInfoModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (fatherCode != null ? !fatherCode.equals(that.fatherCode) : that.fatherCode != null) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (reportCode != null ? !reportCode.equals(that.reportCode) : that.reportCode != null) return false;
        if (showName != null ? !showName.equals(that.showName) : that.showName != null) return false;
        if (typeName != null ? !typeName.equals(that.typeName) : that.typeName != null) return false;
        if (dbColum != null ? !dbColum.equals(that.dbColum) : that.dbColum != null) return false;
        if (formular != null ? !formular.equals(that.formular) : that.formular != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (createBy != null ? !createBy.equals(that.createBy) : that.createBy != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateBy != null ? !updateBy.equals(that.updateBy) : that.updateBy != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (isDeleted != null ? !isDeleted.equals(that.isDeleted) : that.isDeleted != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (fatherCode != null ? fatherCode.hashCode() : 0);
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (reportCode != null ? reportCode.hashCode() : 0);
        result = 31 * result + (showName != null ? showName.hashCode() : 0);
        result = 31 * result + (typeName != null ? typeName.hashCode() : 0);
        result = 31 * result + (dbColum != null ? dbColum.hashCode() : 0);
        result = 31 * result + (formular != null ? formular.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (createBy != null ? createBy.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateBy != null ? updateBy.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (isDeleted != null ? isDeleted.hashCode() : 0);
        return result;
    }
}
